import request from '../utils/request'

// 登录
export function saveUser(data){
    return request({
      url:'/raffle/saveUser',
      method: 'post',
      data
    })
}
// 获取用户信息
export function getUser(){
    return request({
      url:'/raffle/getUser',
      method: 'get',
      
    })
}

// 抽奖
export function getLottery(data){
  return request({
    url:'/raffle/getLottery',
    method: 'post',
    data
  })
}
// 获取抽奖记录
export function getRecord(){
  return request({
    url:'/raffle/getRecord',
    method: 'get',
  })
}
// 获取当前是第几轮
export function getWheel(){
  return request({
    url:'/raffle/getWheel',
    method: 'get',
  })
}
// 开启第几轮抽奖
export function openWheel(number){
  return request({
    url:`/raffle/openWheel?number=${number}`,
    method: 'post',
    number
  })
}
// 开启第几轮抽奖
export function postReset(){
  return request({
    url:`/raffle/postReset`,
    method: 'post',
  })
}